<?php $this->Html->addCrumb('Resources', '/Resources'); ?>
<?php $this->Html->addCrumb('Edit'); ?>
<div class="resources form">
<?php echo $this->Form->create('Resource'); ?>
	<fieldset>
		<legend><?php echo __('Edit Resource'); ?></legend>
	<?php
		echo $this->Form->input('resource_id');
		echo $this->Form->input('resource_title', array(
												'label' => 'File Title',
												'div' =>'formfield',
												'error' => array(
													'wrap' => 'div', 
													'class' => 'formerror')
													));
		echo $this->Form->input('resource_description', array(
												'label' => 'File Description',
												'div' => 'formfield',
												'error' => array(
													'wrap' => 'div', 
													'class' => 'formerror')
													));
		echo $this->Form->input('resource_category',array(
									'options'=>$categories,			
									'label'=>'Office',
									'div' => 'formfield',
									'error' => array(
										'wrap' => 'div', 
										'class' => 'formerror'
										)
									));
		?>
		<div class="control-group">
        <div class="input-append date datetime">
            <?php echo $this->Form->input('resource_date',array('type' => 'text','div' => false, 'label' => array('text' =>'Date', 'class'=>'control-label'), 'wrapInput' => false));?>
				<span class="add-on"><i class="icon-calendar"></i></span>
			</div>
		</div>
		<?php
		echo $this->Form->file('resource_link');
		echo '<br />Uploading a new resource will overwrite previous document';
		
	?>
	</fieldset>
<?php echo $this->Form->end(__('Submit')); ?>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>

		<li><?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $this->Form->value('Resource.resource_id')), null, __('Are you sure you want to delete # %s?', $this->Form->value('Resource.resource_id'))); ?></li>
		<li><?php echo $this->Html->link(__('List Resources'), array('action' => 'index')); ?></li>
	</ul>
</div>
